## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Loading required package: Matrix
## 
## 
## Attaching package: 'Matrix'
## 
## 
## The following objects are masked from 'package:tidyr':
## 
##     expand, pack, unpack
## 
## 
## 
## Attaching package: 'lmerTest'
## 
## 
## The following object is masked from 'package:lme4':
## 
##     lmer
## 
## 
## The following object is masked from 'package:stats':
## 
##     step
## 
## 
## Loading required package: MASS
## 
## 
## Attaching package: 'MASS'
## 
## 
## The following object is masked from 'package:dplyr':
## 
##     select
## 
## 
## Loading required package: mvtnorm
## 
## Loading required package: sandwich
## 
## mediation: Causal Mediation Analysis
## Version: 4.5.1
## 
## 
## This is lavaan 0.6-19
## lavaan is FREE software! Please report any bugs.

Descriptive Stats

1. OVERALL SAMPLE CHARACTERISTICS

## === OVERALL SAMPLE CHARACTERISTICS ===
## Total observations: 12909
## Unique participants: 4303
## Observations per wave:
## 
##    1    2    3 
## 4303 4303 4303

2. DESCRIPTIVE STATISTICS BY WAVE

## 
## === DESCRIPTIVE STATISTICS BY WAVE ===
## # A tibble: 27 × 5
##     wave `General Health Questionnaire_1` Malaise_1 Generalised Anxiety Disord…¹
##    <dbl>                            <dbl>     <dbl>                        <dbl>
##  1     1                          4303      4069                         4086   
##  2     1                             2.44      1.21                         5.32
##  3     1                             0.92      1.68                         2.21
##  4     1                             1         0                            4   
##  5     1                             2         0                            4   
##  6     1                             2         1                            4   
##  7     1                             3         2                            6   
##  8     1                             5         9                           16   
##  9     1                             0       234                          217   
## 10     2                          4302      4279                         4273   
## # ℹ 17 more rows
## # ℹ abbreviated name: ¹​`Generalised Anxiety Disorder_1`
## # ℹ 1 more variable: `Loneliness Scale_1` <dbl>

3. CATEGORICAL VARIABLES BY WAVE

## 
## === CATEGORICAL VARIABLES BY WAVE ===
## Covid Positive Cases by Wave:
## # A tibble: 3 × 6
##    wave   `0`   `1`  `NA` Total Percent_Positive
##   <dbl> <int> <int> <int> <int>            <dbl>
## 1     1  4065   237     1  4302              5.5
## 2     2  3977   292    34  4269              6.8
## 3     3  3864   418    21  4282              9.8
## 
## Hospitalised by Wave:
## # A tibble: 3 × 5
##    wave   `0`   `1` Total Percent_Hospitalised
##   <dbl> <int> <int> <int>                <dbl>
## 1     1  4294     9  4303                  0.2
## 2     2  4292    11  4303                  0.3
## 3     3  4283    20  4303                  0.5
## 
## Household Number Distribution by Wave:
## # A tibble: 3 × 6
##    wave     N Mean_HHNUM SD_HHNUM Min_HHNUM Max_HHNUM
##   <dbl> <int>      <dbl>    <dbl> <dbl+lbl> <dbl+lbl>
## 1     1  4303       2.14     1.08 0         20       
## 2     2  4303       2.08     0.92 1         10       
## 3     3  4303       2.07     0.92 1         10

4. DETAILED FREQUENCY TABLES

## 
## === DETAILED FREQUENCY TABLES ===
## GHQ Score Distribution by Wave:
## # A tibble: 17 × 5
## # Groups:   wave [3]
##     wave GHQ                n percent cum_percent
##    <dbl> <dbl+lbl>      <int>   <dbl>       <dbl>
##  1     1  1 [Excellent]   614    14.3        14.3
##  2     1  2 [Very good]  1805    41.9        56.2
##  3     1  3 [Good]       1361    31.6        87.8
##  4     1  4 [Fair]        443    10.3        98.1
##  5     1  5 [Poor]         80     1.9       100  
##  6     2  1 [Excellent]   631    14.7        14.7
##  7     2  2 [Very good]  1878    43.6        58.3
##  8     2  3 [Good]       1310    30.4        88.7
##  9     2  4 [Fair]        409     9.5        98.2
## 10     2  5 [Poor]         74     1.7        99.9
## 11     2 NA                 1     0          99.9
## 12     3  1 [Excellent]   574    13.3        13.3
## 13     3  2 [Very good]  1674    38.9        52.2
## 14     3  3 [Good]       1373    31.9        84.1
## 15     3  4 [Fair]        553    12.9        97  
## 16     3  5 [Poor]        126     2.9        99.9
## 17     3 NA                 3     0.1       100
## 
## Malaise Score Ranges by Wave:
## # A tibble: 15 × 4
## # Groups:   wave [3]
##     wave malaise_range      n percent
##    <dbl> <chr>          <int>   <dbl>
##  1     1 0-2 (Low)       3399    79  
##  2     1 3-5 (Moderate)   528    12.3
##  3     1 6-8 (High)       136     3.2
##  4     1 9+ (Very High)     6     0.1
##  5     1 Missing          234     5.4
##  6     2 0-2 (Low)       3388    78.7
##  7     2 3-5 (Moderate)   668    15.5
##  8     2 6-8 (High)       215     5  
##  9     2 9+ (Very High)     8     0.2
## 10     2 Missing           24     0.6
## 11     3 0-2 (Low)       3409    79.2
## 12     3 3-5 (Moderate)   639    14.9
## 13     3 6-8 (High)       191     4.4
## 14     3 9+ (Very High)     4     0.1
## 15     3 Missing           60     1.4
## 
## GAD Score Distribution by Wave:
## # A tibble: 42 × 5
## # Groups:   wave [3]
##     wave   GAD     n percent cum_percent
##    <dbl> <dbl> <int>   <dbl>       <dbl>
##  1     1     4  2275    52.9        52.9
##  2     1     5   590    13.7        66.6
##  3     1     6   478    11.1        77.7
##  4     1     7   239     5.6        83.3
##  5     1     8   187     4.3        87.6
##  6     1     9    78     1.8        89.4
##  7     1    10    75     1.7        91.1
##  8     1    11    37     0.9        92  
##  9     1    12    35     0.8        92.8
## 10     1    13    21     0.5        93.3
## # ℹ 32 more rows

5. CORRELATION MATRIX BY WAVE

## 
## === CORRELATION MATRICES BY WAVE ===
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths

## 6. MISSING DATA ANALYSIS

## 
## === MISSING DATA ANALYSIS ===
## # A tibble: 3 × 14
##    wave N_total GHQ_missing malaise_missing GAD_missing LONELY_missing
##   <dbl>   <int>       <int>           <int>       <int>          <int>
## 1     1    4303           0             234         217            227
## 2     2    4303           1              24          30             24
## 3     3    4303           3              60          62             56
## # ℹ 8 more variables: covid_positive_missing <int>, hospitalise_missing <int>,
## #   GHQ_missing_percent <dbl>, malaise_missing_percent <dbl>,
## #   GAD_missing_percent <dbl>, LONELY_missing_percent <dbl>,
## #   covid_positive_missing_percent <dbl>, hospitalise_missing_percent <dbl>

7. SUMMARY TABLE FOR PUBLICATION

## 
## === PUBLICATION-READY SUMMARY TABLE ===
## # A tibble: 3 × 8
##    wave     N GHQ_mean_sd malaise_mean_sd GAD_mean_sd LONELY_mean_sd
##   <dbl> <int> <chr>       <chr>           <chr>       <chr>         
## 1     1  4303 2.44 (0.92) 1.21 (1.68)     5.32 (2.21) 5.44 (2)      
## 2     2  4303 2.4 (0.91)  1.44 (1.85)     5.36 (2.21) 5.33 (1.99)   
## 3     3  4303 2.53 (0.97) 1.36 (1.8)      5.45 (2.27) 5.66 (2.09)   
## # ℹ 2 more variables: COVID_positive <chr>, Hospitalized <chr>
## 
## === ANALYSIS COMPLETE ===
## This comprehensive descriptive analysis provides:
## 1. Overall sample characteristics
## 2. Descriptive statistics by wave for continuous variables
## 3. Frequency distributions for categorical variables
## 4. Detailed frequency tables
## 5. Correlation matrices by wave
## 6. Missing data analysis
## 7. Publication-ready summary table

Visualising descriptive stats

Check the correlation / relationship between variables

Hypothesis 1: Having COVID will predict poorer mental health

Hypothesis 2: COVID severity predicts poorer mental health

1. DESCRIPTIVE COMPARISONS: COVID vs NO-COVID

## === COVID-19 AND MENTAL HEALTH PREDICTIVE ANALYSIS ===
## 1. DESCRIPTIVE COMPARISONS BY COVID STATUS
## # A tibble: 3 × 8
##   covid_positive     N N_unique_participants General Health Questionna…¹ Malaise
##   <chr>          <int>                 <int> <chr>                       <chr>  
## 1 Covid Negative 11906                  4151 2.45 (0.93)                 1.31 (…
## 2 Covid Positive   947                   534 2.52 (1)                    1.57 (…
## 3 <NA>              56                    53 2.45 (0.86)                 2.05 (…
## # ℹ abbreviated name: ¹​`General Health Questionnaire`
## # ℹ 3 more variables: `Generalised Anxiety Disorder` <chr>,
## #   `Loneliness Scale` <chr>, `Hospitalised Rate` <chr>

2. SIMPLE T-TESTS FOR EACH MENTAL HEALTH OUTCOME

## 
## 
## 2. T-TESTS: COVID POSITIVE vs COVID NEGATIVE
## # A tibble: 4 × 8
##   Variable      COVID_Mean No_COVID_Mean Difference t_statistic p_value Cohens_d
##   <chr>              <dbl>         <dbl>      <dbl>       <dbl>   <dbl>    <dbl>
## 1 General Heal…       2.52          2.45       0.07        2.11  0.0349    0.076
## 2 Malaise             1.57          1.31       0.26        4.18  0         0.147
## 3 Generalised …       5.61          5.36       0.25        3.07  0.0022    0.112
## 4 Loneliness S…       5.62          5.46       0.16        2.23  0.0258    0.077
## # ℹ 1 more variable: Effect_Size <chr>

3. LONGITUDINAL MIXED-EFFECTS MODELS

## 
## 
## 3. MIXED-EFFECTS MODELS: LONGITUDINAL ANALYSIS
## 
## Analyzing: General Health Questionnaire 
## Basic Model AIC: 27067.81 
## Enhanced Model AIC: 27069.53 
## Hospitalization Effect: β = 0.061 , p = 0.5985 
## 
## Analyzing: Malaise 
## Basic Model AIC: 42565.45 
## Enhanced Model AIC: 42565.46 
## Hospitalization Effect: β = 0.31 , p = 0.1587 
## 
## Analyzing: Generalised Anxiety Disorder 
## Basic Model AIC: 49777.88 
## Enhanced Model AIC: 49777.86 
## Hospitalization Effect: β = 0.431 , p = 0.1544 
## 
## Analyzing: Loneliness Scale 
## Basic Model AIC: 46610.69 
## Enhanced Model AIC: 46612.69 
## Hospitalization Effect: β = 0.009 , p = 0.9736
## # A tibble: 8 × 7
##   Variable         Model COVID_Coefficient COVID_SE COVID_p_value COVID_CI_lower
##   <chr>            <chr>             <dbl>    <dbl>         <dbl>          <dbl>
## 1 General Health … Basi…             0.042    0.027        0.116          -0.01 
## 2 General Health … Enha…             0.04     0.027        0.138          -0.013
## 3 Malaise          Basi…             0.14     0.051        0.0065          0.039
## 4 Malaise          Enha…             0.13     0.052        0.0125          0.028
## 5 Generalised Anx… Basi…             0.194    0.069        0.0052          0.058
## 6 Generalised Anx… Enha…             0.179    0.07         0.0106          0.042
## 7 Loneliness Scale Basi…             0.025    0.061        0.678          -0.094
## 8 Loneliness Scale Enha…             0.025    0.062        0.685          -0.096
## # ℹ 1 more variable: COVID_CI_upper <dbl>

## 4. TIMING ANALYSIS: WHEN DO EFFECTS APPEAR?

## 
## 
## 4. TIMING ANALYSIS: COVID EFFECTS BY WAVE
## ========================================
## 
## Wave 1 Analysis:
## 
## Wave 2 Analysis:
## 
## Wave 3 Analysis:
## # A tibble: 12 × 7
##     Wave Variable        COVID_Mean No_COVID_Mean Difference p_value Significant
##    <int> <chr>                <dbl>         <dbl>      <dbl>   <dbl> <chr>      
##  1     1 General Health…       2.51          2.43       0.08  0.227  No         
##  2     1 Malaise               1.45          1.2        0.25  0.0321 Yes        
##  3     1 Generalised An…       5.56          5.3        0.26  0.114  No         
##  4     1 Loneliness Sca…       5.72          5.43       0.29  0.0464 Yes        
##  5     2 General Health…       2.33          2.4       -0.07  0.190  No         
##  6     2 Malaise               1.66          1.41       0.25  0.0403 Yes        
##  7     2 Generalised An…       5.59          5.34       0.25  0.0902 No         
##  8     2 Loneliness Sca…       5.46          5.32       0.14  0.244  No         
##  9     3 General Health…       2.66          2.52       0.14  0.0064 Yes        
## 10     3 Malaise               1.59          1.33       0.26  0.0067 Yes        
## 11     3 Generalised An…       5.65          5.43       0.22  0.0809 No         
## 12     3 Loneliness Sca…       5.68          5.65       0.03  0.786  No

5. HOSPITALIZATION AS SEVERITY INDICATOR

## 
## 
## 5. DOSE-RESPONSE ANALYSIS: COVID SEVERITY EFFECTS
## 
##  General Health Questionnaire by COVID Severity:
## # A tibble: 3 × 4
##   covid_severity               N  Mean    SD
##   <chr>                    <int> <dbl> <dbl>
## 1 COVID - Hospitalized        37  3.19  1.13
## 2 COVID - Not Hospitalized   910  2.49  0.99
## 3 No COVID                 11906  2.45  0.93
## F-statistic: 12.325 , p-value: 0 
## 
##  Malaise by COVID Severity:
## # A tibble: 3 × 4
##   covid_severity               N  Mean    SD
##   <chr>                    <int> <dbl> <dbl>
## 1 COVID - Hospitalized        37  2.56  2.08
## 2 COVID - Not Hospitalized   910  1.54  1.81
## 3 No COVID                 11906  1.31  1.77
## F-statistic: 14.978 , p-value: 0 
## 
##  Generalised Anxiety Disorder by COVID Severity:
## # A tibble: 3 × 4
##   covid_severity               N  Mean    SD
##   <chr>                    <int> <dbl> <dbl>
## 1 COVID - Hospitalized        37  6.57  3   
## 2 COVID - Not Hospitalized   910  5.57  2.37
## 3 No COVID                 11906  5.36  2.21
## F-statistic: 9.024 , p-value: 1e-04 
## 
##  Loneliness Scale by COVID Severity:
## # A tibble: 3 × 4
##   covid_severity               N  Mean    SD
##   <chr>                    <int> <dbl> <dbl>
## 1 COVID - Hospitalized        37  6.46  2.38
## 2 COVID - Not Hospitalized   910  5.59  2.04
## 3 No COVID                 11906  5.46  2.03
## F-statistic: 5.863 , p-value: 0.0028

6. SUMMARY AND INTERPRETATION

## 
## 
## 6. SUMMARY AND INTERPRETATION
## Key Findings:
## 1. Descriptive comparisons show mean differences between COVID+ and COVID- groups
## 2. T-tests provide statistical significance and effect sizes for group differences
## 3. Mixed-effects models account for repeated measures and individual differences
## 4. Wave-by-wave analysis shows when effects emerge or persist
## 5. Severity analysis tests dose-response relationship
## Interpretation Guide:
## - Positive coefficients = COVID associated with WORSE mental health
## - Negative coefficients = COVID associated with BETTER mental health
## - p < 0.05 = statistically significant effect
## - Cohen's d: 0.2=small, 0.5=medium, 0.8=large effect
## Next Steps:
## 1. Check model assumptions (residuals, normality)
## 2. Consider additional covariates (age, gender, SES)
## 3. Test for interaction effects (COVID × time)
## 4. Consider lagged effects (COVID in wave X predicting MH in wave X+1)
## 
## === ANALYSIS COMPLETE ===

Hypothesis 3: Lonliness and hospitalisation (COVID severity) are mediators between the relationship of COVID positivity and mental health (general anxiety & malaise).

SEM model with mediation

## Running SEM analysis to explore direct effect (COVID positive on loneliness, anxiety and malaise.
## lavaan 0.6-19 ended normally after 16 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                         9
## 
##                                                   Used       Total
##   Number of observations                         12430       12909
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   LONELY ~                                                              
##     covd_pstv  (a)    0.157    0.069    2.271    0.023    0.157    0.020
##   GAD ~                                                                 
##     LONELY    (b1)    0.583    0.008   70.143    0.000    0.583    0.532
##     covd_pstv (c1)    0.146    0.064    2.281    0.023    0.146    0.017
##   malaise ~                                                             
##     LONELY    (b2)    0.445    0.007   65.582    0.000    0.445    0.507
##     covd_pstv (c2)    0.182    0.052    3.462    0.001    0.182    0.027
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .GAD ~~                                                                
##    .malaise           1.958    0.031   62.878    0.000    1.958    0.683
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .LONELY            4.091    0.052   78.835    0.000    4.091    1.000
##    .GAD               3.511    0.045   78.835    0.000    3.511    0.716
##    .malaise           2.341    0.030   78.835    0.000    2.341    0.742
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     indirect_GAD      0.092    0.040    2.270    0.023    0.092    0.011
##     indirect_malas    0.070    0.031    2.270    0.023    0.070    0.010
##     total_GAD         0.238    0.076    3.141    0.002    0.238    0.028
##     total_malaise     0.252    0.061    4.137    0.000    0.252    0.037
## The DAG diagram showing relationships between variables in SEM model 1
## Plot coordinates for graph not supplied! Generating coordinates, see ?coordinates for how to set your own.

## The SEM model1-based path diagram.

## The second SEM model adding in hospitalisation as a second predictor.
## lavaan 0.6-19 ended normally after 16 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        12
## 
##                                                   Used       Total
##   Number of observations                         12430       12909
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 0.000
##   Degrees of freedom                                 0
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   LONELY ~                                                              
##     covd_pstv (a1)    0.132    0.070    1.874    0.061    0.132    0.017
##     hospitals (a2)    0.652    0.330    1.978    0.048    0.652    0.018
##   GAD ~                                                                 
##     LONELY    (b1)    0.583    0.008   70.113    0.000    0.583    0.532
##     covd_pstv (c1)    0.130    0.065    1.998    0.046    0.130    0.015
##     hospitals (c2)    0.413    0.306    1.352    0.176    0.413    0.010
##   malaise ~                                                             
##     LONELY    (b2)    0.445    0.007   65.544    0.000    0.445    0.506
##     covd_pstv (d1)    0.158    0.053    2.962    0.003    0.158    0.023
##     hospitals (d2)    0.609    0.250    2.441    0.015    0.609    0.019
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .GAD ~~                                                                
##    .malaise           1.957    0.031   62.874    0.000    1.957    0.683
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .LONELY            4.090    0.052   78.835    0.000    4.090    0.999
##    .GAD               3.511    0.045   78.835    0.000    3.511    0.716
##    .malaise           2.340    0.030   78.835    0.000    2.340    0.742
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     indirect_GAD      0.077    0.041    1.873    0.061    0.077    0.009
##     indrct_GAD_hsp    0.380    0.192    1.977    0.048    0.380    0.010
##     indirect_malas    0.059    0.031    1.873    0.061    0.059    0.009
##     indrct_mls_hsp    0.290    0.147    1.977    0.048    0.290    0.009
##     total_GAD         1.001    0.355    2.818    0.005    1.001    0.045
##     total_malaise     1.116    0.285    3.918    0.000    1.116    0.060
## The DAG diagram of SEM model 2 which added hospitalisation as a separate predictor.
## Plot coordinates for graph not supplied! Generating coordinates, see ?coordinates for how to set your own.

## The path diagram adding in Hospitalisation as a mediator (SEM model2).

## From     To  Weight
## 4     -->     1   1 
## 5     -->     1   1 
## 1     -->     2   1 
## 4     -->     2   1 
## 5     -->     2   1 
## 1     -->     3   1 
## 4     -->     3   1 
## 5     -->     3   1 
## 1     <->     1   1 
## 2     <->     2   1 
## 3     <->     3   1 
## 2     <->     3   1 
## 4     <->     4   1 
## 4     <->     5   1 
## 5     <->     5   1 
## 3     <->     2   1 
## 5     <->     4   1

Exploring longitudinal effects

## lavaan 0.6-19 ended normally after 161 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        58
## 
##                                                   Used       Total
##   Number of observations                          4250        4303
##   Number of missing patterns                        36            
## 
## Model Test User Model:
##                                                       
##   Test statistic                              1486.585
##   Degrees of freedom                                50
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   GAD_2 ~                                                               
##     GAD_1             0.345    0.014   24.465    0.000    0.345    0.355
##   GAD_3 ~                                                               
##     GAD_2             0.471    0.015   30.764    0.000    0.471    0.462
##   LONELY_2 ~                                                            
##     LONELY_1          0.710    0.011   66.199    0.000    0.710    0.717
##   LONELY_3 ~                                                            
##     LONELY_2          0.781    0.011   70.313    0.000    0.781    0.737
##   malaise_2 ~                                                           
##     malaise_1         0.623    0.017   35.745    0.000    0.623    0.579
##   malaise_3 ~                                                           
##     malaise_2         0.539    0.013   41.801    0.000    0.539    0.560
##   GAD_1 ~                                                               
##     covid_positv_1    0.004   11.626    0.000    1.000    0.004    0.000
##     hospitalise_1    -0.054   36.098   -0.001    0.999   -0.054   -0.001
##     LONELY_1          0.329   36.239    0.009    0.993    0.329    0.297
##     malaise_1         0.552   84.955    0.006    0.995    0.552    0.420
##   GAD_2 ~                                                               
##     covid_positv_2    0.059    0.077    0.770    0.441    0.059    0.007
##     hospitalise_2     0.034    0.382    0.089    0.929    0.034    0.001
##     LONELY_2          0.228    0.016   14.527    0.000    0.228    0.209
##     malaise_2         0.505    0.024   21.362    0.000    0.505    0.425
##   GAD_3 ~                                                               
##     covid_positv_3    0.121    0.067    1.796    0.072    0.121    0.016
##     hospitalise_3    -0.145    0.298   -0.485    0.628   -0.145   -0.004
##     LONELY_3          0.229    0.015   14.984    0.000    0.229    0.218
##     malaise_3         0.383    0.024   15.984    0.000    0.383    0.305
##   malaise_1 ~                                                           
##     covid_positv_1    0.118    4.285    0.027    0.978    0.118    0.016
##     hospitalise_1     0.381    9.776    0.039    0.969    0.381    0.010
##     LONELY_1          0.289   30.526    0.009    0.992    0.289    0.342
##     GAD_1             0.243   54.065    0.005    0.996    0.243    0.319
##   malaise_2 ~                                                           
##     covid_positv_2    0.094    0.066    1.418    0.156    0.094    0.013
##     hospitalise_2     0.435    0.337    1.290    0.197    0.435    0.012
##     LONELY_2          0.183    0.014   12.859    0.000    0.183    0.199
##     GAD_2             0.158    0.019    8.170    0.000    0.158    0.187
##   malaise_3 ~                                                           
##     covid_positv_3    0.127    0.050    2.548    0.011    0.127    0.022
##     hospitalise_3    -0.018    0.222   -0.082    0.935   -0.018   -0.001
##     LONELY_3          0.155    0.011   13.483    0.000    0.155    0.186
##     GAD_3             0.220    0.014   15.481    0.000    0.220    0.276
##   LONELY_1 ~                                                            
##     covid_positv_1    0.316    0.137    2.302    0.021    0.316    0.036
##     hospitalise_1     0.292    0.675    0.432    0.665    0.292    0.007
##   LONELY_2 ~                                                            
##     covid_positv_2    0.013    0.086    0.151    0.880    0.013    0.002
##     hospitalise_2     1.016    0.422    2.410    0.016    1.016    0.026
##   LONELY_3 ~                                                            
##     covid_positv_3    0.029    0.075    0.391    0.696    0.029    0.004
##     hospitalise_3    -0.441    0.333   -1.326    0.185   -0.441   -0.014
##   GAD_2 ~                                                               
##     LONELY_1         -0.053    0.015   -3.585    0.000   -0.053   -0.049
##   GAD_3 ~                                                               
##     LONELY_2         -0.071    0.016   -4.553    0.000   -0.071   -0.064
##   malaise_2 ~                                                           
##     LONELY_1         -0.067    0.013   -5.261    0.000   -0.067   -0.074
##   malaise_3 ~                                                           
##     LONELY_2         -0.077    0.011   -6.770    0.000   -0.077   -0.087
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .GAD_2             1.869    0.081   23.196    0.000    1.869    0.867
##    .GAD_3             1.481    0.084   17.714    0.000    1.481    0.674
##    .LONELY_2          1.453    0.062   23.298    0.000    1.453    0.736
##    .LONELY_3          1.500    0.063   23.663    0.000    1.500    0.716
##    .malaise_2        -0.792    0.076  -10.418    0.000   -0.792   -0.436
##    .malaise_3        -1.086    0.060  -18.083    0.000   -1.086   -0.622
##    .GAD_1             2.860   93.948    0.030    0.976    2.860    1.291
##    .malaise_1        -1.653  121.657   -0.014    0.989   -1.653   -0.980
##    .LONELY_1          5.427    0.032  170.273    0.000    5.427    2.719
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .GAD_2             1.532    0.036   42.804    0.000    1.532    0.330
##    .GAD_3             1.595    0.039   40.491    0.000    1.595    0.331
##    .LONELY_2          1.891    0.042   45.148    0.000    1.891    0.484
##    .LONELY_3          2.004    0.044   45.718    0.000    2.004    0.457
##    .malaise_2         1.136    0.035   32.707    0.000    1.136    0.345
##    .malaise_3         0.883    0.022   40.189    0.000    0.883    0.290
##    .GAD_1             2.282  108.991    0.021    0.983    2.282    0.465
##    .malaise_1         1.453  100.102    0.015    0.988    1.453    0.510
##    .LONELY_1          3.977    0.088   45.238    0.000    3.977    0.999

Generating a DAG diagram of longitudinal effect

## 
## Attaching package: 'ggdag'
## The following object is masked from 'package:stats':
## 
##     filter

Generating path diagram for longitudinal SEM model.

##  [1] "GAD_2"            "GAD_3"            "LONELY_2"         "LONELY_3"        
##  [5] "malaise_2"        "malaise_3"        "GAD_1"            "malaise_1"       
##  [9] "LONELY_1"         "covid_positive_1" "hospitalise_1"    "covid_positive_2"
## [13] "hospitalise_2"    "covid_positive_3" "hospitalise_3"

Splitting the plot by variables

GAD plot

Malaise plot

Loneliness